package com.siwei.mes.service.experiment;

import com.github.pagehelper.PageInfo;
import com.siwei.mes.common.query.PageQuery;
import com.siwei.mes.entity.experiment.ExperimentWaybill;
import com.siwei.mes.entity.sync.tc.Waybill;

import java.util.List;

/**
 * 试验台账与运单关系(ExperimentWaybill)表服务接口
 *
 * @author makejava
 * @since 2024-05-27 21:37:50
 */
public interface ExperimentWaybillService {

    /**
     * 新增
     *
     * @param entity
     * @return
     */
    Long create(ExperimentWaybill entity);

    /**
     * 修改
     *
     * @param entity
     */
    void update(ExperimentWaybill entity);

    /**
     * 删除
     *
     * @param id
     */
    void delete(Long id);

    /**
     * 获取所有分组  分页
     *
     * @param query
     * @return
     */
    PageInfo<ExperimentWaybill> getPage(PageQuery<ExperimentWaybill, ExperimentWaybill> query);

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    ExperimentWaybill loadById(Long id);

    /**
     * 获取所有
     *
     * @param entity
     * @return
     */
    List<ExperimentWaybill> getAll(ExperimentWaybill entity);

    List<Waybill> selectByExperimentId(Long id);

    /**
     * 删除试验委托和运单关系
     *
     * @param experimentId 试验委托id
     * @param waybillId    运单id
     */
    void deleteByExperimentIdAndWaybillId(Long experimentId, Long waybillId);
}
